using Microsoft.Extensions.DependencyInjection;

using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;

using WL.Think.Abp;
using WL.Think.Abp.Localization;

namespace WL.Think.Sample;

public class SampleSharedModule : ThinkAbpDomainSharedModule
{
    protected override void ConfigureLocalization(ServiceConfigurationContext context)
    {
        context.Services.Configure<AbpLocalizationOptions>(opts =>
        {
            opts.Resources
                .Get<ThinkResource>()
                .AddVirtualJson("/Localization/Sample");
        });
        base.ConfigureLocalization(context);
    }

    protected override void ConfigureVirtualFileSystem(ServiceConfigurationContext context)
    {
        Configure<AbpVirtualFileSystemOptions>(opts => opts.FileSets.AddEmbedded<SampleSharedModule>());
    }
}
